package org.example.ychdp.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * ticket
 * @author 
 */
public class Ticket implements Serializable {
    /**
     * 票务 ID
     */
    private Integer ticketid;

    /**
     * 演唱会 ID
     */
    private Integer concertid;

    /**
     * 票档类型
     */
    private String tickettype;

    /**
     * 票价
     */
    private BigDecimal price;

    /**
     * 剩余票数
     */
    private Integer remainingtickets;

    /**
     * 座位区域
     */
    private String seatarea;

    private static final long serialVersionUID = 1L;

    public Integer getTicketid() {
        return ticketid;
    }

    public void setTicketid(Integer ticketid) {
        this.ticketid = ticketid;
    }

    public Integer getConcertid() {
        return concertid;
    }

    public void setConcertid(Integer concertid) {
        this.concertid = concertid;
    }

    public String getTickettype() {
        return tickettype;
    }

    public void setTickettype(String tickettype) {
        this.tickettype = tickettype;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getRemainingtickets() {
        return remainingtickets;
    }

    public void setRemainingtickets(Integer remainingtickets) {
        this.remainingtickets = remainingtickets;
    }

    public String getSeatarea() {
        return seatarea;
    }

    public void setSeatarea(String seatarea) {
        this.seatarea = seatarea;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Ticket other = (Ticket) that;
        return (this.getTicketid() == null ? other.getTicketid() == null : this.getTicketid().equals(other.getTicketid()))
            && (this.getConcertid() == null ? other.getConcertid() == null : this.getConcertid().equals(other.getConcertid()))
            && (this.getTickettype() == null ? other.getTickettype() == null : this.getTickettype().equals(other.getTickettype()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getRemainingtickets() == null ? other.getRemainingtickets() == null : this.getRemainingtickets().equals(other.getRemainingtickets()))
            && (this.getSeatarea() == null ? other.getSeatarea() == null : this.getSeatarea().equals(other.getSeatarea()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTicketid() == null) ? 0 : getTicketid().hashCode());
        result = prime * result + ((getConcertid() == null) ? 0 : getConcertid().hashCode());
        result = prime * result + ((getTickettype() == null) ? 0 : getTickettype().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getRemainingtickets() == null) ? 0 : getRemainingtickets().hashCode());
        result = prime * result + ((getSeatarea() == null) ? 0 : getSeatarea().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", ticketid=").append(ticketid);
        sb.append(", concertid=").append(concertid);
        sb.append(", tickettype=").append(tickettype);
        sb.append(", price=").append(price);
        sb.append(", remainingtickets=").append(remainingtickets);
        sb.append(", seatarea=").append(seatarea);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}